import {Config} from '../../utils/conf.js';
import {httpReq} from '../../utils/http.js';

class area
{
  getList(that,offset,kw=''){
    let obj = {};
    obj.url = Config.areaurl;
    obj.data = {offset,limit:10,wd:kw}
    httpReq(obj).then(res=>{
      if( offset == 0){
        that.data.rows = [];
      }
      that.setData({
        rows:that.data.rows.concat(res.data.data),
        limit: res.data.data.length + that.data.limit
      })
    })
  }
}

export default area;